#ifndef __C_FS_H__
#define __C_FS_H__

#include "std/list.h"

#ifdef __cplusplus
extern "C" {
#endif

struct dentry;
struct kmem_cache;
struct inode_operations;
struct dentry_operations;

// global variables
extern struct kmem_cache* dentry_cache;

typedef struct fs_object
{
	listnode_t ownerlist;
	struct dentry* root;
	struct dentry_operations* dops;
}
fs_object_t;

extern fs_object_t devfs;
extern fs_object_t rootfs;

// create file system
int _fs_create(fs_object_t* fsobject, unsigned char* name,
		struct dentry_operations *dops, struct inode_operations* iops);
fs_object_t* fs_create(unsigned char* name,
		struct dentry_operations *dops, struct inode_operations* iops);

// global initialization
void global_init_vfs_module(void);

#ifdef __cplusplus
}
#endif
#endif
/* EOF */
